1. Field of the Invention
The present invention relates to a method and apparatus for controlling a packet flow in accordance with corresponding port bandwidths.
2. Description of the Related Art
Internet Service Providers (ISPs) have attempted to assign individual bandwidths for different information types. An Ethernet switch is an exemplary device which may have the function of controlling bandwidth. However, the Ethernet switch may not control the bandwidth most effectively, for example an Ethernet switch may only operate with fixed bandwidth. Therefore, the Ethernet switch may not be able to satisfy the various bandwidth requirements of different users. For example, the Ethernet switch may be a 10 Mbps Ethernet switch, even though a user may only require 5 Mbps of bandwidth the user only have the option to use 10 Mbps of bandwidth due to the fixed bandwidth of the Ethernet switch. Therefore the ISP might waste 5 Mbps bandwidth that could be used by another user. The Ethernet switch may calculate bandwidth as a bit rate (bits/sec), i.e. the bits of the packet(s) transmitted/received per second. The Ethernet switch may sometimes transmit/receive packets above a predetermined bit rate of 10 Mbps. Therefore, a large counter may be required for calculating the bits/sec, and additionally a divider may be required for dividing the bits by a second so as to obtain the bit rate in bits/sec. As a result, the hardware size of the Ethernet switch is increased. In addition, because the divider may be used, it may be difficult to process a remainder of the calculations from the division operation of the divider.